﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileDetailsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.HomeProfileDetailsAdmin" %>
<owc:OwGrid ID="HomeProfileDetailsdv" runat="server" SkinID="OwGridAdmin" DataSourceID="HomeProfileDetailsOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="HomeProfileDetailsOds" DataKeyNames="OpenHomeProfileDetailID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileDetailID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:ThumbImage %>' HeaderStyle-Width="200px">
                <ItemTemplate>
                    <img src='<%#Eval("Avartar") %>' id="ThumbAvartar" height="150px" width="180px" />
                </ItemTemplate>
                <HeaderStyle Width="200px"></HeaderStyle>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%#Eval("Title")%>
                                </i>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="FullNameOwR" runat="server" OwText="FullName" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#(OwEnum.NameTitles)Eval("NameTitle").OwToInt64TryParseReturn0()+"."%>
                                <%#Eval("FullName") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="FiveElementOwR" runat="server" OwText="FiveELement" OwSuffix=":" />
                            </td>
                            <td>
                                <%#OwFiveElementsBLL.OwGetEntity(Eval("FiveElementID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="TwelveYearCycleOfAnimalOwR" runat="server" OwText="TwelveYearCycleOfAnimal"
                                    OwSuffix=":" />
                            </td>
                            <td>
                                <%#OwTwelveYearCycleOfAnimalsBLL.OwGetEntity(Eval("TwelveYearCycleOfAnimalID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ZodiacOwR" runat="server" OwText="Zodiac" OwSuffix=":" />
                            </td>
                            <td>
                                <%#OwZodiacsBLL.OwGetEntity(Eval("ZodiacID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="LanguageLabelOwR" runat="server" OwText="Language"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ContinentOwR" runat="server" OwText="Continent"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("HometownContinentID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="CountryOwR" runat="server" OwText="Country"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("HometownCountryID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DistrictOwR" runat="server" OwText="District"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("HometownDistrictID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ProvinceOwR" runat="server" OwText="Province"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("HometownProvinceID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="WardOwR" runat="server" OwText="Ward"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("HometownWardID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Description %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="DefaultLabel" runat="server" OwText="DafaultLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDefaultCbb" runat="server" Checked='<%# Bind("IsDefault") %>'
                                    AutoPostBack="True" CssClass="HiddenText" Text='<%# Eval("OpenHomeProfileDetailID") %>'
                                    OnCheckedChanged="IsDefaultCbb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DeletedLabelOwR" runat="server" OwText="Delete" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%# Eval("IsDeleted") %>'
                                    Enabled='<%# !(bool)Eval("IsDefault") %>' CssClass="HiddenText" OnCheckedChanged="IsDeletedCheckBox_CheckedChanged"
                                    AutoPostBack="True" Text='<%# Eval("OpenHomeProfileDetailID") %>' />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfilesDetailEdit.aspx?ID=<%#Eval("OpenHomeProfileDetailID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                    </owc:OwConfirmButton>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("HomeProfilesDetailEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="HomeProfileDetailsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
    EnablePaging="true" SelectCountMethod="OwGetByDynamicCount" UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="openHomeProfileID" Type="Int64" />
        <asp:Parameter Name="firstNameID" Type="Int64" />
        <asp:Parameter Name="lastNameID" Type="Int64" />
        <asp:Parameter Name="isDefault" Type="Boolean" />
        <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
        <asp:Parameter Name="fiveElementID" Type="Int32" />
        <asp:Parameter Name="hometownContinentID" Type="Int64" />
        <asp:Parameter Name="hometownCountryID" Type="Int64" />
        <asp:Parameter Name="hometownProvinceID" Type="Int64" />
        <asp:Parameter Name="hometownDistrictID" Type="Int64" />
        <asp:Parameter Name="hometownWardID" Type="Int64" />
        <asp:Parameter Name="zodiacID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
